import request from "@/utils/request";

export default {
  // 条件查询全部讲师列表
  getTeachersPage(current, limit, teacherQuery) {
    return request({
      url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: "post",
      data: teacherQuery
    });
  },
  removeById(teacherId) {
    return request({
      url: `/eduservice/teacher/${teacherId}`,
      method: "delete"
    });
  },
  addTeacher(teacher) {
    return request({
      url: `/eduservice/teacher`,
      method: "post",
      data: teacher
    });
  },
  getTeacherInfo(id){
    return request({
      url: `/eduservice/teacher/${id}`,
      method: "get"
    });
  },
  updateTeacherInfo(teacher){
    return request({
      url: `/eduservice/teacher/${teacher.id}`,
      method: "put",
      data: teacher
    });
  }
};
